<html>
<head>
<title>EPK.</title>
<!--javascript: -->

<script type="text/javascript"> 

	function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frahilea.length) {
    d=parent.frahilea[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
<style>
.m2 {
   font-family:MS Sans Serif;
   font-size:10pt;
   color:#FFFFFF
}
</style>
</head>
<body bgcolor="424a6e" background="images/fondo_bist1.jpg">

<? 	$pasa_bai=false;
	$bat=$_COOKIE["bat"];
	$bi=$_COOKIE["bi"];
	

			if (!$konexioa=mysql_connect('localhost')) {
   				die('Ez da konektatu : ' . mysql_error());
			}// if konexioa
			if (!mysql_select_db("users")){
   				die("Ez da datu-basea existitzen - oO!");
			}//if select_db
			$sql_gald="SELECT * FROM kirolari WHERE izena='$bat' && pasahitza='$bi'";
			$pito= mysql_query($sql_gald) or die(mysql_error());
			if ($kaka=mysql_fetch_array($pito))
			{//emaitza dau
				$pasa_bai=true;
			}
		
      	if(!$pasa_bai){?>
        <div align="center"><font color="#FFFFFF"><h3>Ez daukazu baimenik hemen egoteko</h3></font></div>
		<? 
		}else{ 
			if (!mysql_select_db("planak")){
   				die("Ez da datu-basea existitzen - oO!");}//if select_db
			$planid=$_GET['plana'];
			$sql_gald2="SELECT * FROM plan WHERE planid='$planid' && erab='$bat'";
			$pito2= mysql_query($sql_gald2) or die(mysql_error());
			?><table align="center" class="m2" border="0"><?
			while ($kaka2=mysql_fetch_array($pito2))
			{
			?>
			
				<!--! //irudia txertatzeko -->
						<tr><td><img src="arik_images/<? echo $kaka2[1]; ?>.jpg" height="100" width="100"/></td><td>
						<tr><td>&nbsp;</td></tr><tr><td><big><? echo $kaka2[2]."x".$kaka2[3]."/".$kaka2[6]; ?></big></td></tr>
                        <tr><td>Errepikapenak: </td><td><? echo $kaka2[3]; ?></td></tr>
                        <tr><td>Karga: </td><td><? echo $kaka2[4]; ?></td></tr>
                        <tr><td>Frekuentzia: </td><td><? echo $kaka2[5]; ?></td></tr>
                        <tr><td>Abiadura: </td><td><? echo $kaka2[7]; ?></td></tr>
                        <tr><td>Max%: </td><td><? echo $kaka2[8]; ?></td></tr>
						<tr"><td><hr></td><td><hr></td></tr>
            <?
			}
	  }//else ?>
      </table>
<? echo "<div align=\"right\"><b><p><a href=\"javascript:window.close();\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('g2','','images/itxi_bist2.jpg',1)\">
<img src=\"images/itxi_bist1.jpg\" border=\"0\" id=\"g2\" /></a></p></b></div>";
?>
</body>
</html>
